package com.mj;

import com.mj.dao.BookDao;
import com.mj.entity.Book;
import org.junit.Test;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Demo {
    @Test
    public void tt(){
        ClassPathXmlApplicationContext ct = new ClassPathXmlApplicationContext("applicationContext.xml");
        BookDao bd = ct.getBean(BookDao.class);
        Book book = bd.queryById(4);
        System.out.println(book);
        ct.close();
    }
}
